<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
                'id' => 'ccbpl-form',
                'enableAjaxValidation' => false,
            ));
    ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'survey'); ?>
        <?php echo $form->textField($model, 'survey', array('size' => 60, 'maxlength' => 100)); ?>
        <?php echo $form->error($model, 'survey'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'idccward'); ?>
        <?php echo $form->textField($model, 'idccward', array('size' => 10, 'maxlength' => 10)); ?>
        <?php
        $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
            'id' => 'mydialog',
            // additional javascript options for the dialog plugin
            'options' => array(
                'title' => 'Dialog box 1',
                'autoOpen' => false,
                'width' => 'auto',
            ),
        ));
        $model1 = Cczone::model();
//        $model1 = Cczone::model()->findAll(array('order' => 'zonename'));
        echo 'dialog content here';
//        $this->widget('zii.widgets.grid.CGridView', array(
//            'id' => 'ccbpl-grid1',
//            'dataProvider' => $model1->search(),
//            'columns' => array(
//                'idcczone',
//                'zonename',
//            ),
//        ));
        
//        echo '<div id="forAjaxReplace">';    
////echo $this->renderPartial('/cczone/_form');        
//Yii::app()->controller->renderFile(Yii::app()->basePath.'/views/cczone/_form.php', array('model'=>$model1));
//
//echo '</div>';
//echo Yii::app()->basePath.'/models/Cczone';
$dataProvider=new CActiveDataProvider('Cczone');

//$this->widget('zii.widgets.grid.CGridView', array(
//    'dataProvider'=>$dataProvider,
//));        

//echo $this->renderPartial(Yii::app()->basePath.'/views/cczone/_view.php', null, false, true);
//echo $this->renderPartial('_view', array('model'=>$mode));

        $this->endWidget('zii.widgets.jui.CJuiDialog');

echo CHtml::link('open dialog', '#', array(
   'onclick'=>CHtml::ajax(array(
        'success'=>'function(data){
            $("#forAjaxReplace").html(data);
            $("#mydialog").dialog("open");
            return false;
        }') 
    )
));
        
        echo CHtml::Button('Get Pendaftar', array('onclick' => '$("#mydialog").dialog("open"); return false;',
        ));

        // the link that may open the dialog
        echo CHtml::link('open dialog', '#', array(
            'onclick' => '$("#mydialog").dialog("open"); return false;',
        ));
        ?>
<!--        <img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/cp-1/images/looplogo.png" onclick='$("#mydialog").dialog("open"); return false;'/>-->
        <?php echo $form->error($model, 'idccward'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'headoffamily'); ?>
        <?php echo $form->textField($model, 'headoffamily', array('size' => 60, 'maxlength' => 100)); ?>
        <?php echo $form->error($model, 'headoffamily'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'bplname'); ?>
        <?php echo $form->textField($model, 'bplname', array('size' => 60, 'maxlength' => 100)); ?>
        <?php echo $form->error($model, 'bplname'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'bpladdress'); ?>
        <?php echo $form->textField($model, 'bpladdress', array('size' => 60, 'maxlength' => 100)); ?>
        <?php echo $form->error($model, 'bpladdress'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'idccsex'); ?>
        <?php echo $form->textField($model, 'idccsex', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'idccsex'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'idcccategory'); ?>
        <?php echo $form->textField($model, 'idcccategory', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'idcccategory'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'idccreligion'); ?>
        <?php echo $form->textField($model, 'idccreligion', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'idccreligion'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'monthlyincome'); ?>
        <?php echo $form->textField($model, 'monthlyincome', array('size' => 15, 'maxlength' => 15)); ?>
        <?php echo $form->error($model, 'monthlyincome'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'familymember'); ?>
        <?php echo $form->textField($model, 'familymember', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'familymember'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'remark'); ?>
        <?php echo $form->textField($model, 'remark', array('size' => 60, 'maxlength' => 100)); ?>
        <?php echo $form->error($model, 'remark'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'ccbplflag'); ?>
        <?php echo $form->textField($model, 'ccbplflag'); ?>
        <?php echo $form->error($model, 'ccbplflag'); ?>
    </div>

    <div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->